package com.bj.dljd.excepyions;

import com.bj.dljd.excepyions.BossException;
import com.bj.dljd.models.response.R;

/*自定义异常类*/
public class BossException extends RuntimeException{

    private R respCode;

    public BossException() {
        super();
    }

    public BossException(String message) {
        super(message);
    }

    public BossException(R respCode) {
        super(respCode.getMsg());
        this.respCode = respCode;
    }


    public R getRespCode() {
        return respCode;
    }
    public static R WARN(R respCode){
        R ajaxResult = new R();
        ajaxResult.setCode(respCode.getCode());
        ajaxResult.setMsg(respCode.getMsg());
        ajaxResult.setData("");
        return ajaxResult;
    }
}
